<template>
  <a-modal title="查看详情" :width="1000" :maskClosable="false" :visible="visible" @cancel="visible = false">
    <a slot="footer">
      <a-button @click="visible = false">关闭</a-button>
    </a>
    <a-spin :indicator="indicator" :spinning="spinning" :tip="tip">
      <div class="spin-content">
        <a-descriptions :column="1">
          <a-descriptions-item label="地址">
            {{ detail.repairAddress }}
          </a-descriptions-item>
          <a-descriptions-item label="联系人">
            {{ detail.personName }}
          </a-descriptions-item>
          <a-descriptions-item label="联系电话">
            {{ detail.phone }}
          </a-descriptions-item>
          <a-descriptions-item label="报修类型">
            {{ detail.RepairTypeName }}
          </a-descriptions-item>
          <a-descriptions-item label="报修时间">
            {{ $moment(detail.addTime).format("YYYY-MM-DD HH:mm:ss") }}
          </a-descriptions-item>
          <a-descriptions-item label="报修内容">
            {{ detail.repairContext }}
          </a-descriptions-item>

        </a-descriptions>

        <a-descriptions bordered :column="1" v-if="detail.IsHandle">
          <a-descriptions-item label="处理人">
            {{ detail.HandleUserName }}
          </a-descriptions-item>
          <a-descriptions-item label="处理时间">
            {{ $moment(detail.repairTime).format("YYYY-MM-DD HH:mm:ss") }}
          </a-descriptions-item>
        </a-descriptions>
      </div>
    </a-spin>
  </a-modal>
</template>

<script>
export default {
  name: "",
  components: {},
  props: {
    actionType: {
      type: String,
      required: false,
      default: "add",
    },
  },
  data () {
    return {
      visible: false,
      button_loading: false,
      spinning: false,
      tip: null,
      indicator: <a-icon type="loading" style="font-size: 24px" spin />,
      detail: {}
    };
  },
  computed: {},
  watch: {},
  created () { },
  mounted () { },
  methods: {
    view (data) {
      if (data) {
        Object.assign(this, {

          visible: true,
          CodeDisabled: false,
          currentId: data.id,
        });
        this.detail = data;
      }
    },
  },
};
</script>
<style>
/** lang='less' scoped */
</style>
